package com.jianyun.jyzs.bean;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.field.ForeignCollectionField;
import com.j256.ormlite.table.DatabaseTable;

import java.io.Serializable;
import java.util.List;

@DatabaseTable
public class ProvinceModel implements Serializable{
	@DatabaseField(generatedId=true)
	private int id;
	@DatabaseField
	private String name;
	@ForeignCollectionField(columnName = CityModel.TABLE_NAME)
	private List<CityModel> cityList;
	
	public ProvinceModel() {
		super();
	}

	public ProvinceModel(String name, List<CityModel> cityList) {
		super();
		this.name = name;
		this.cityList = cityList;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<CityModel> getCityList() {
		return cityList;
	}

	public void setCityList(List<CityModel> cityList) {
		this.cityList = cityList;
	}

	@Override
	public String toString() {
		return "ProvinceModel{" +
				"id=" + id +
				", name='" + name + '\'' +
				", cityList=" + cityList +
				'}';
	}
}
